def production(n):
    e=...
    k=0
    while k<n:
        ...
        k=k+1
    return e